package rms.mall.server.starter.controller.system;


import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import rms.mall.server.api.module.Result;
import rms.mall.server.application.service.MenuInfoService;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/v1/menu-info")
public class MenuController {

    @Resource
    private MenuInfoService menuInfoService;


    @GetMapping("/tree")
    public Result queryMenuTree() {
        return Result.OK(menuInfoService.treeMenu());
    }
}
